.sql-comparison-view {
  margin-top: 16px;
}

.sql-comparison-view .sql-card {
  height: 100%;
}

.sql-comparison-view .sql-card .ant-card-head {
  padding: 8px 16px;
  min-height: auto;
}

.sql-comparison-view .original-sql .ant-card-head {
  background: #fff2f0;
  border-bottom: 1px solid #ffccc7;
}

.sql-comparison-view .optimized-sql .ant-card-head {
  background: #f6ffed;
  border-bottom: 1px solid #b7eb8f;
}

.sql-comparison-view .ant-card-body {
  padding: 0;
}

.highlight-legend {
  margin-top: 8px;
  padding: 8px;
  background: #fafafa;
  border-radius: 4px;
  font-size: 12px;
}

.legend-item {
  margin-left: 8px;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 500;
}

.legend-addition {
  background: #e6f7ff;
  color: #1890ff;
}

.legend-deletion {
  background: #fff2f0;
  color: #ff4d4f;
}

.legend-modification {
  background: #feffe6;
  color: #faad14;
}

.changes-detail {
  background: #fafafa;
  border-radius: 6px;
  padding: 16px;
}

.changes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.change-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 13px;
  border-left: 3px solid #ddd;
}

.change-addition {
  background: #e6f7ff;
  border-left-color: #1890ff;
}

.change-deletion {
  background: #fff2f0;
  border-left-color: #ff4d4f;
}

.change-modification {
  background: #feffe6;
  border-left-color: #faad14;
}

.change-type {
  font-weight: 600;
  margin-right: 12px;
  min-width: 40px;
}

.change-location {
  color: #666;
  margin-right: 12px;
  font-size: 12px;
  min-width: 100px;
}

.change-description {
  flex: 1;
  color: #333;
}

.change-addition .change-type {
  color: #1890ff;
}

.change-deletion .change-type {
  color: #ff4d4f;
}

.change-modification .change-type {
  color: #faad14;
}

/* Monaco Editor 高亮样式 */
.highlight-addition {
  background-color: rgba(24, 144, 255, 0.2) !important;
  border: 1px solid #1890ff;
}

.highlight-deletion {
  background-color: rgba(255, 77, 79, 0.2) !important;
  border: 1px solid #ff4d4f;
}

.highlight-modification {
  background-color: rgba(250, 173, 20, 0.2) !important;
  border: 1px solid #faad14;
}

.sql-comparison-view .ant-row {
  height: 100%;
}

.sql-comparison-view .ant-col {
  height: 100%;
}

@media (max-width: 768px) {
  .sql-comparison-view .ant-row {
    flex-direction: column;
  }
  
  .sql-comparison-view .ant-col {
    width: 100% !important;
    margin-bottom: 16px;
  }
  
  .change-item {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .change-type,
  .change-location {
    margin-bottom: 4px;
    margin-right: 0;
  }
}